/**
* Copyright @ 2023 iAuto (Shanghai) Co., Ltd.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are NOT permitted except as agreed by
* iAuto (Shanghai) Co., Ltd.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/


/**
 * @description 警告弹窗 列表中请不要使用
 */
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Modal } from 'antd';
import React from 'react';

export default (content: string | React.ReactNode, onOk: () => void, onCancel?: () => void) => {
  Modal.confirm({
    title: '删除',
    // wrapClassName: 'layer-model-box',
    icon: <ExclamationCircleOutlined />,
    className: 'title',
    content,
    // okButtonProps: {
    //   type: 'default',
    // },
    onOk() {
      onOk?.();
    },
    onCancel() {
      onCancel?.();
    },
  });
};
